package com.gitee.chenyaohua.util;

import java.lang.reflect.Field;

public class ReflectionUtils {

    public static void setValue(Object obj,String fieldName,String value) throws NoSuchFieldException, IllegalAccessException {
        Class<?> aClass = obj.getClass();
        Field field = aClass.getDeclaredField(fieldName);
        field.setAccessible(true);
        field.set(obj,value);
    }
}
